<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>static_string</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__static_buffer_base/static_buffer_base0.html" title="static_buffer_base::static_buffer_base">
<link rel="next" href="boost__beast__static_string/append.html" title="static_string::append">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__static_buffer_base/static_buffer_base0.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__static_string/append.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__static_string"></a><a class="link" href="boost__beast__static_string.html" title="static_string">static_string</a>
</h4></div></div></div>
<p>
        A modifiable string with a fixed-size storage area.
      </p>
<h5>
<a name="beast.ref.boost__beast__static_string.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__static_string.synopsis"></a></span><a class="link" href="boost__beast__static_string.html#beast.ref.boost__beast__static_string.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/core/static_string.hpp" target="_top">boost/beast/core/static_string.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">,</span>
    <span class="keyword">class</span> <span class="identifier">CharT</span> <span class="special">=</span> <span class="keyword">char</span><span class="special">,</span>
    <span class="keyword">class</span> <span class="identifier">Traits</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;&gt;</span>
<span class="keyword">class</span> <span class="identifier">static_string</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__static_string.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__static_string.types"></a></span><a class="link" href="boost__beast__static_string.html#beast.ref.boost__beast__static_string.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/const_iterator.html" title="static_string::const_iterator"><span class="bold"><strong>const_iterator</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/const_pointer.html" title="static_string::const_pointer"><span class="bold"><strong>const_pointer</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/const_reference.html" title="static_string::const_reference"><span class="bold"><strong>const_reference</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/const_reverse_iterator.html" title="static_string::const_reverse_iterator"><span class="bold"><strong>const_reverse_iterator</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/difference_type.html" title="static_string::difference_type"><span class="bold"><strong>difference_type</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/iterator.html" title="static_string::iterator"><span class="bold"><strong>iterator</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/pointer.html" title="static_string::pointer"><span class="bold"><strong>pointer</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/reference.html" title="static_string::reference"><span class="bold"><strong>reference</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/reverse_iterator.html" title="static_string::reverse_iterator"><span class="bold"><strong>reverse_iterator</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/size_type.html" title="static_string::size_type"><span class="bold"><strong>size_type</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/string_view_type.html" title="static_string::string_view_type"><span class="bold"><strong>string_view_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The type of string_view returned by the interface.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/traits_type.html" title="static_string::traits_type"><span class="bold"><strong>traits_type</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/value_type.html" title="static_string::value_type"><span class="bold"><strong>value_type</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__static_string.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__static_string.member_functions"></a></span><a class="link" href="boost__beast__static_string.html#beast.ref.boost__beast__static_string.member_functions">Member Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/append.html" title="static_string::append"><span class="bold"><strong>append</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/assign.html" title="static_string::assign"><span class="bold"><strong>assign</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Assign count copies of ch.
                </p>
                <p>
                  Assign from another static_string
                </p>
                <p>
                  Assign count characterss starting at npos from other.
                </p>
                <p>
                  Assign the first count characters of s, including nulls.
                </p>
                <p>
                  Assign a null terminated string.
                </p>
                <p>
                  Assign from an iterator range of characters.
                </p>
                <p>
                  Assign from any object convertible to string_view_type.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/at.html" title="static_string::at"><span class="bold"><strong>at</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Access specified character with bounds checking.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/back.html" title="static_string::back"><span class="bold"><strong>back</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Accesses the last character.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/begin.html" title="static_string::begin"><span class="bold"><strong>begin</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns an iterator to the beginning.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/c_str.html" title="static_string::c_str"><span class="bold"><strong>c_str</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns a non-modifiable standard C character array version of
                  the string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/capacity.html" title="static_string::capacity"><span class="bold"><strong>capacity</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns the number of characters that can be held in currently
                  allocated storage.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/cbegin.html" title="static_string::cbegin"><span class="bold"><strong>cbegin</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns an iterator to the beginning.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/cend.html" title="static_string::cend"><span class="bold"><strong>cend</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns an iterator to the end.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/clear.html" title="static_string::clear"><span class="bold"><strong>clear</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Clears the contents.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/compare.html" title="static_string::compare"><span class="bold"><strong>compare</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/copy.html" title="static_string::copy"><span class="bold"><strong>copy</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Copy a substring (pos, pos+count) to character string pointed to
                  by dest.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/crbegin.html" title="static_string::crbegin"><span class="bold"><strong>crbegin</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns a reverse iterator to the beginning.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/crend.html" title="static_string::crend"><span class="bold"><strong>crend</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns a reverse iterator to the end.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/data.html" title="static_string::data"><span class="bold"><strong>data</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns a pointer to the first character of a string.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/empty.html" title="static_string::empty"><span class="bold"><strong>empty</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns true if the string is empty.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/end.html" title="static_string::end"><span class="bold"><strong>end</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns an iterator to the end.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/erase.html" title="static_string::erase"><span class="bold"><strong>erase</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/front.html" title="static_string::front"><span class="bold"><strong>front</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Accesses the first character.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/insert.html" title="static_string::insert"><span class="bold"><strong>insert</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/length.html" title="static_string::length"><span class="bold"><strong>length</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns the number of characters, excluding the null terminator.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/max_size.html" title="static_string::max_size"><span class="bold"><strong>max_size</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns the maximum number of characters that can be stored, excluding
                  the null terminator.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/operator_string_view_type.html" title="static_string::operator string_view_type"><span class="bold"><strong>operator string_view_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Convert a static string to a string_view_type
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/operator_plus__eq_.html" title="static_string::operator+="><span class="bold"><strong>operator+=</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/operator_eq_.html" title="static_string::operator="><span class="bold"><strong>operator=</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Copy assignment.
                </p>
                <p>
                  Assign from null-terminated string.
                </p>
                <p>
                  Assign from single character.
                </p>
                <p>
                  Assign from initializer list.
                </p>
                <p>
                  Assign from string_view_type.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/operator_lb__rb_.html" title="static_string::operator[]"><span class="bold"><strong>operator[]</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Access specified character.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/pop_back.html" title="static_string::pop_back"><span class="bold"><strong>pop_back</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/push_back.html" title="static_string::push_back"><span class="bold"><strong>push_back</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/rbegin.html" title="static_string::rbegin"><span class="bold"><strong>rbegin</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns a reverse iterator to the beginning.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/rend.html" title="static_string::rend"><span class="bold"><strong>rend</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns a reverse iterator to the end.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/reserve.html" title="static_string::reserve"><span class="bold"><strong>reserve</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Reserves storage.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/resize.html" title="static_string::resize"><span class="bold"><strong>resize</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Changes the number of characters stored.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/shrink_to_fit.html" title="static_string::shrink_to_fit"><span class="bold"><strong>shrink_to_fit</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Reduces memory usage by freeing unused memory.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/size.html" title="static_string::size"><span class="bold"><strong>size</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Returns the number of characters, excluding the null terminator.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/static_string.html" title="static_string::static_string"><span class="bold"><strong>static_string</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Default constructor (empty string).
                </p>
                <p>
                  Construct with count copies of character ch.
                </p>
                <p>
                  Construct with a substring (pos, other.size()) of other.
                </p>
                <p>
                  Construct with a substring (pos, count) of other.
                </p>
                <p>
                  Construct with the first count characters of s, including nulls.
                </p>
                <p>
                  Construct from a null terminated string.
                </p>
                <p>
                  Construct from a range of characters.
                </p>
                <p>
                  Copy constructor.
                </p>
                <p>
                  Construct from an initializer list.
                </p>
                <p>
                  Construct from a string_view
                </p>
                <p>
                  Construct from any object convertible to string_view_type.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/substr.html" title="static_string::substr"><span class="bold"><strong>substr</strong></span></a>
                </p>
              </td>
<td>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/swap.html" title="static_string::swap"><span class="bold"><strong>swap</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Exchange the contents of this string with another.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__static_string.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__static_string.data_members"></a></span><a class="link" href="boost__beast__static_string.html#beast.ref.boost__beast__static_string.data_members">Data
        Members</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/max_size_n.html" title="static_string::max_size_n"><span class="bold"><strong>max_size_n</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Maximum size of the string excluding the null terminator.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="boost__beast__static_string/npos.html" title="static_string::npos"><span class="bold"><strong>npos</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  A special index.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__static_string.h4"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__static_string.description"></a></span><a class="link" href="boost__beast__static_string.html#beast.ref.boost__beast__static_string.description">Description</a>
      </h5>
<p>
        These objects behave like <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
        except that the storage is not dynamically allocated but rather fixed in
        size.
      </p>
<p>
        These strings offer performance advantages when a protocol imposes a natural
        small upper limit on the size of a value.
      </p>
<h5>
<a name="beast.ref.boost__beast__static_string.h5"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__static_string.remarks"></a></span><a class="link" href="boost__beast__static_string.html#beast.ref.boost__beast__static_string.remarks">Remarks</a>
      </h5>
<p>
        The stored string is always null-terminated.
      </p>
<h5>
<a name="beast.ref.boost__beast__static_string.h6"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__static_string.see_also"></a></span><a class="link" href="boost__beast__static_string.html#beast.ref.boost__beast__static_string.see_also">See
        Also</a>
      </h5>
<p>
        <a class="link" href="boost__beast__to_static_string.html" title="to_static_string"><code class="computeroutput"><span class="identifier">to_static_string</span></code></a>
      </p>
<p>
        Convenience header <code class="literal">&lt;<a href="../../../../../../boost/beast/core.hpp" target="_top">boost/beast/core.hpp</a>&gt;</code>
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2016, 2017 Vinnie Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__static_buffer_base/static_buffer_base0.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__static_string/append.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
